# 使用 while 循环计算1~100的和
sum100 = 0  # 表示1~100的和
i = 1
while i <= 100:
    sum100 += i  # sum100 = sum100 + i
    i += 1
print("sum100:", sum100)
# sum100 = sum100 + i  # 1
# i += 1
# sum100 = sum100 + i  # 1 + 2 = 3
# i += 1
# sum100 = sum100 + i  # 1 + 2 + 3 = 6
# i += 1
# sum100 = sum100 + i  # 1 + 2 + 3 + 4 = 10
# .......
# i += 1
# sum100 = sum100 + i  # 1 + 2 + .... + 99 + 100 = 5050


# hp = 3  # 怪物的血量
# while hp > 0:  # 当血量大于0，才放技能
#     print("吃我一招♂  ")
#     hp -= 1  # hp = hp - 1
# print("怪物挂掉了♂  ")